package com.intretech.umsin.auth;

import feign.Logger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

@Slf4j
@SpringBootApplication
@ComponentScan({"com.intretech.umsin"})
@EnableDiscoveryClient
@EnableFeignClients
public class App {

    public static void main(String[] args) {
        ApplicationContext ctx = SpringApplication.run(App.class, args);
        log.info("初始化spring bean个数：{}.", ctx.getBeanDefinitionCount());
        for (String beanDefinitionName : ctx.getBeanDefinitionNames()) {
            log.info("初始化spring bean：{}.", beanDefinitionName);
        }
    }

    @Bean
    Logger.Level feignLoggerLevel() {
        return Logger.Level.FULL;
    }

}
